package net.hn.hnms.sys.system.api;


import cn.hutool.core.lang.tree.Tree;
import net.hn.hnms.sys.common.core.constant.ServiceNameConstants;
import net.hn.hnms.sys.system.api.domain.SysDept;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import java.util.List;

/**
 * 部门服务
 *
 * @author Lion Li
 */
@FeignClient(contextId = "RemoteDeptService", value = ServiceNameConstants.SYSTEM_SERVICE)
public interface RemoteDeptService {

    @GetMapping(value = "/remoteDept/{deptIds}")
    public List<SysDept> getDeptByIds(@PathVariable("deptIds") List<Long> deptIds);

    @GetMapping(value = "/remoteDept/getDeptByOrganizationCode/{organizationCode}")
    public List<SysDept> getDeptByOrganizationCode(@PathVariable("organizationCode") String organizationCode);


    @PostMapping(value = "/remoteDept/getTreeSelectOrg")
    public List<Tree<Integer>> getTreeSelectOrg(SysDept dept) ;
}
